#include "dwgrectangle.h"

DwgRectangle::DwgRectangle() = default;

void DwgRectangle::setRectangle(const QPoint &topLeft, const QPoint &bottomRight)
{
    mTopLeft = topLeft;
    mBottomRight = bottomRight;
    // 使用左上角和右下角坐标创建 QRect 对象
}

void DwgRectangle::Draw(QPainter *p)
{
    mRect = QRect(mTopLeft, mBottomRight);
    // 绘制矩形
    p->drawRect(mRect);
}
